﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WingtipToys.Account
{
    public partial class userList_test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public void userGridView_OnSelectedIndexChanged(Object sender, EventArgs e)
        {
            userDetailsSqlDataSource.SelectParameters["EmpID"].DefaultValue =
              userGridView.SelectedValue.ToString();
            userGridView.DataBind();
        }

        public void userFormView_ItemUpdated(Object sender, FormViewUpdatedEventArgs e)
        {
            userGridView.DataBind();
        }

        public void userFormView_ItemDeleted(Object sender, FormViewDeletedEventArgs e)
        {
            userGridView.DataBind();
        }

        public void UserDetailsSqlDataSource_OnInserted(Object sender, SqlDataSourceStatusEventArgs e)
        {
            System.Data.Common.DbCommand command = e.Command;

            //userDetailsSqlDataSource.SelectParameters["EmpID"].DefaultValue =
            //command.Parameters["@EmpID"].Value.ToString();

            userGridView.DataBind();
            userFormView.DataBind();
        }
    }
}